home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)G
/
(A)G6.ADF
/
seeker
< prev
next >
Wrap
Text File
|
1988-05-24
|
2KB
|
55 lines
drive wheel 100 \ a wheel type drive with 100 armor \
cpu 2x16bit \ an average cpu \
weapon mgun 40 50 \ b rocket rail with 40 armor and 50 rockets \
weapon mgun 40 50
weapon mgun 40 50
weapon mgun 40 50
reg 5
equate direc 0
equate dist 1
equate width 2
equate spd 3
posy, # 50, -
posx, # 50, -
atan2, # 180 +, sto direc \ direction to center of arena \
# 20, sto width \ 20 degree beam width \
label start
rcl width, rcl direc, radar \ scan in front of you \
x<0? goto nothing \ nothing there?, then goto nothing \
\ obviously, there's something there \
sto dist
# -20, +, rcl width, /, # 10, *
x<0? # 0, sto spd
speed \ if far, go in fast \
rcl direc, heading \ head towards it \
rcl width, # 1.5, rcl dist, /, r-d
x<y? goto nofire \ don't fire unless you know where it is\
rcl direc, aim \ aim at it \
rcl dist\, rcl spd, # 20, /, -\ \ pull shot short \
fire 0, fire 1, fire 2, fire 3 \ kill!!!! \
goto start \ keep firing \
label nofire \ there's something there, but not exactly sure where. \
# .6, sto* width
goto start \ narrow the width, and look again. \
label nothing \ scanned, and didn't find anything \
# 2, sto/ spd, rcl spd, speed \ cut speed in half each time through \
\rcl width, # 10, x>y?, sto width\ \ at least a 10 degree width \
rcl width, sto+ direc \ look to the left \
rcl direc, radar x>0? goto start \ if something's there, keep going (start)\
rcl width, # 2, *, sto- direc \ look to the right \
rcl width, rcl direc, radar
x>0? goto start \ if it's there, keep going (start)\
rcl width, sto+ direc \ go back to original direction \
# 2, sto* width \ double the scan width \
goto nothing \ look 'till you find something (nothing)\